package com.njwb.day03;

public class Test12 {
    public static void main(String[] args) {
        int[] is={1,2,3,4,5,6};
        //对数组中所有数据进行求和
        int sum=0;
        for (int index=0;index<is.length;index++){
            sum+=is[index];
        }
        System.out.println(sum);



    }
}
